package com.bigknow.appstore.proxy.entity;


import com.bigknow.appstore.proxy.enumerate.SecurityType;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * 统一的安全策略类
 * Created by chaos on 2016/5/18.
 */
public class SecurityMeta implements Serializable{

    private SecurityType securityType;

    private Map<String, String> policyAttrs = new HashMap<>();

    /**
     * 满足条件是通过（true），还是不通过（false）
     * 目前只有 ip类型的支持这个参数
     */
    private boolean pass=true;

    private boolean writeSuccessLog;

    private boolean writeFailLog;

    public Map<String, String> getPolicyAttrs() {
        return policyAttrs;
    }

    public void setPolicyAttrs(Map<String, String> policyAttrs) {
        this.policyAttrs = policyAttrs;
    }

    public SecurityType getSecurityType() {
        return securityType;
    }

    public void setSecurityType(SecurityType securityType) {
        this.securityType = securityType;
    }

    public boolean isPass() {
        return pass;
    }

    public void setPass(boolean pass) {
        this.pass = pass;
    }

    public boolean isWriteSuccessLog() {
        return writeSuccessLog;
    }

    public void setWriteSuccessLog(boolean writeSuccessLog) {
        this.writeSuccessLog = writeSuccessLog;
    }

    public boolean isWriteFailLog() {
        return writeFailLog;
    }

    public void setWriteFailLog(boolean writeFailLog) {
        this.writeFailLog = writeFailLog;
    }
}
